<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    // 设置变量
    var name = "高清"
    // 打印输出，在浏览器中f12看console
    console.log(name)

    //声明
    var name = "高强"
    //常见功能
    //获取长度
    var v1 = name.length;
    //下标访问
    var v2 = name[0];
    var v3 = charAt(3);
    //去除空白
    var v4 = name.trim()
    //切片,前取后不取
    var v5 = name.substring(0, 2)
</script>
</body>
</html>